4.1
class Cat:
    name=""
    tili=0
    def __init__(self,n,t) -> None:
        self.name=n
        self.tili=t
    def play(self):
        self.tili-=10
        print("%s在玩耍,体力减少10\n"%self.name)
        self.status()
    def rest(self):
        self.tili+=10
        print("%s在睡觉,补充体力10\n"%self.name)
        self.status()
    def status(self):
        print("%s现在的体力是%s\n"%(self.name,self.tili))
cat1=Cat("小白",100)
cat1.play()